const express=require('express')
const router= express.Router();
const db=require('../../utils/db')

module.exports = router

router.post('/getshop',function(req,res,next){ 
  let mysql=`insert into shop_information (shop_id,shop_name,shop_region,shop_county,shop_address,shop_time,shop_status,shop_head_photo,shop_description) VALUES (NULL,'${req.body.name}','${req.body.region}','${req.body.county}','${req.body.address}','${req.body.data}','${req.body.status}','${req.body.src}','${req.body.desc}')`
  db(mysql,function(err,data){
    if (err) {
        return res.json({
            code: 500,
            msg: '查询失败'
        })
    }
    res.json({
      code: 200,
      msg: '查询成功',
  })
})
})